package grape.sequence.rest.config.vo;
import grape.base.service.dict.api.IDictService;
import grape.common.rest.validation.props.PropValid;
import grape.common.rest.vo.BaseIdVo;

import grape.common.service.trans.TransBy;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 序列生成配置表
 * </p>
 *
 * @author yangwei
 * @since 2020-08-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="序列生成配置数据响应对象")
public class ConfigVo extends BaseIdVo<String> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "编码")
    private String code;

    @ApiModelProperty(value = "名称")
    private String name;

    @ApiModelProperty(value = "周期")
    private Integer period;

    @ApiModelProperty(value = "周期单位")
    private String periodUnitDictId;

    @TransBy(type = IDictService.trans_dictName,byFieldName = "periodUnitDictId")
    @ApiModelProperty(value = "周期单位字典名称")
    private String periodUnitDictName;

    @ApiModelProperty(value = "初始值")
    private Integer startValue;

    @ApiModelProperty(value = "步长")
    private Integer stepValue;

    @ApiModelProperty(value = "前缀")
    private String prefix;

    @ApiModelProperty(value = "前缀是否拼接周期")
    private Boolean isPrefixWithPeriod;

    @ApiModelProperty(value = "最小长度")
    private Integer minLength;

    @ApiModelProperty(value = "占位字符")
    private String prepend;

    @ApiModelProperty(value = "序列当前值")
    private String currentValue;

    @ApiModelProperty(value = "备注")
    private String remark;


}
